package sanshi.contect.udpstarter.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import sanshi.contect.udpstarter.entity.UDPEntity;


import java.util.concurrent.Executors;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;

/**
 * 声明存储消息队列
 * @author sanshi
 */
@Configuration
public class UDPQueueConfig {




    @Autowired
    private UDPEntity entity;


    @Bean
    public LinkedBlockingQueue<byte[]> recvLinkedBlockingQueue(){

        return new LinkedBlockingQueue<byte[]>(entity.getQueueSize());
    }


}
